package ArrayListTest;

import javafx.print.Collation;

public class MyArrayListTest {
    public static void main(String[] args) {
        MyArrayList<String> list = new MyArrayList<>();
        // 添加
        list.add("one");
        list.add("two");
        list.add("three");
        list.add("four");
        list.add("five");
        System.out.println("list:"+list); // list:[one, two, three, four, five]

        String a = list.get(3);
        System.out.println(a); // four

        list.set(1, "two2");
        System.out.println("list:"+list); // list:[one, two2, three, four, five]

        list.remove(0);
        System.out.println("list:"+list); // list:[two2, three, four, five]
    }
}
